'use strict';
import React from 'react';
import {
    View,
    Text,
    Image,
    TouchableOpacity,
} from 'react-native';
import Global from '../Commom/GlobalConst';

const width = Global.Const.size.width;


class RuralActivity extends React.Component {


    render() {
        let activity = this.props.activity;
        return (
            <TouchableOpacity style={{height:120,width}}
                              onPress={() => this.props.onItemClick(activity.id)}>
                <View
                    style={{alignItems:'center',flexDirection:'row',height:120,width,backgroundColor: 'white'}}>
                    <Image style={{marginLeft:10,width:100,height:100}}
                           source={{uri: activity.images}}
                    ></Image>
                    <View style={{marginLeft:18,height:120,width:width-120}}>
                        <Text numberOfLines={1}
                              style={{fontSize:14,marginTop:10,color:Global.FontColor.DimGray}}>{activity.title}</Text>
                        <Text numberOfLines={4}
                              style={{fontSize:12,marginTop:8,color:Global.FontColor.DarkGray}}>{activity.descript}</Text>
                    </View>
                </View>
            </TouchableOpacity>
        )
    }
}

export default RuralActivity;